package com.corecloud.tools;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.util.StringUtils;

/**
 * 分页参数工具类
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class PageDemo extends Page {


	//每页数据条数
	private Long limit;

	//数据总数
	private Long count;

	//layui页码
	private Long page;


	public PageDemo(Long limit,Long page) {
		if(!StringUtils.isEmpty(limit)){
			super.size = limit;
		}
		if(!StringUtils.isEmpty(page)){
			super.current = page;
		}
	}
}
